package com.company.One;

public class Cat extends Pet{

    public Cat() {
    }

    public Cat(String name, int health, int love) {
        super(name, health, love);
    }

    @Override
    public void toHospital() {
        if (this.getHealth()<60){
            print();
            System.out.println("主人，"  + this.getName() +"生病了, 健康值为：" + this.getHealth()+"\n生命垂危，需要治疗" );
        }
    }
}
